import React from 'react';

class PageTitle extends React.Component {
    constructor(props){
        super(props);
    }
    componentWillMount() {
        document.title = this.props.title + "-SPACE MALL"
    }
    render() {
        return (
            <div className="row">
                <div className="col-md-12">
                    <h1 className='page-header'>{this.props.title}</h1>
                    {this.props.children}
                    {/* 当前组件为容器组件 */}
                </div>
            </div>
        );
    }
}

export default PageTitle 